#include "stake.h"

Stake::Stake()
{
    top = 0;
}

bool Stake::push(int data)
{
    if(top >= 20)
        return false;
    this->a[top] = data;
    top++;
    return true;
}

bool Stake::pop(int & data)
{
    if(top <= 0)
        return false;

    data = this->a[top-1];
    top--;
    return true;
}
